use bevy::math::{IVec2, Vec2};

/// 世界坐标转地图坐标
pub fn world_pos_to_block_map_pos(world_pos: &Vec2) -> IVec2 {
    world_pos
        .map(|pos| {
            if pos > 0. {
                return pos / 100.0 + 1.;
            }
            return pos / 100.0;
        })
        .as_ivec2()
}
